Optical Image Stabilization (OIS) may effectively avoid image blur caused by jitter during a process of the user taking pictures with a mobile terminal. OIS uses a magnetically wrapped suspension lens to effectively overcome image blur caused by vibration of the mobile terminal. In the related art, the anti-shake is realized by a photosensitive element, of which the principles may be described as followings. The photosensitive element is fixed on a bracket that can move up, down, left, and right, and the direction and amplitude data of the shaking of the mobile terminal are sensed by a gyro sensor. After that, the gyro sensor transmits the data. Screening and amplification are performed on the data at the processor side to calculate the amount of movement of the photosensitive element that may compensate the jitter. During the process of the user taking pictures with the mobile terminal, it is also necessary to perform phase focusing on the scene to be photographed. In the related art, by hiding some masked pixels on the photosensitive element, and considering the distance between the pixels of the scene to be photographed and its changing factors, the focusing offset value may be determined to achieve the phase focusing.
In this way, the masked pixels may only be used to detect the phase and cannot be used to display the image. The masked pixels may affect the quality of the image photographed. The higher the density of the masked pixels, the more accurate the phase focusing, but the worse the quality of the image photographed.